package com.wb.business.service.sa;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.project.relation.domain.ao.SyncActionRequest;
import com.ruoyi.project.relation.domain.ao.SyncActonResponse;
import com.wb.business.service.BusinessEntityService;
import com.wb.business.utils.SyncActionUtils;
import org.shoukaiseki.aqoeous.model.CustomQO;
import org.shoukaiseki.aqoeous.processor.CustomQOProcessor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.repository.NoRepositoryBean;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 *
 **/
@NoRepositoryBean
public class BaseAppService extends BaseService{

    @Autowired
    protected CustomQOProcessor customQOProcessor;


    public Map<String, Object> parserCustomQO(List<CustomQO> list){
        Map<String, Object> qoMapList = customQOProcessor.parserCustomQO(list);
        return qoMapList;
    }

    public Map<String, Object> parserCustomQO(CustomQO... customQOs){
        List list = Stream.of(customQOs).collect(Collectors.toList());
        Map<String, Object> qoMapList = customQOProcessor.parserCustomQO(list);
        return qoMapList;
    }

}
